


<%@page contentType="text/html" pageEncoding="UTF-8"%>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
<link rel="stylesheet" href="css/style.css" />
<link rel="stylesheet" href="css/front.css"  />
<%
        String user;
        try {
	if (session.getAttribute("UserName") != null)	{
            user = session.getAttribute("UserName").toString();

%>


<script language="javascript">
	function OpenWebPage(link){
		window.document.location = "index.jsp?Noidung=" + link
	}
	function Login()	{
			document.Login.action = "include/Process_Login.jsp";
			document.Login.submit();
	}
</script>

<link rel="stylesheet" href="CSS/index.css" />
<table width="965" border="0" cellpadding="0" cellspacing="0" class="loginBar">
  <!--DWLayoutTable-->
  <tr>
    <td width="154" height="39" valign="middle"> Xin chào  &nbsp;&nbsp;&nbsp;&nbsp;
		<a href="user.jsp"	 style="color:#FF0000">
	<%=user%>		</a>    </td>
  <td width="96">&nbsp;</td>
    <td width="80" valign="middle">
  	<a href="include/logoff.jsp">
		<img src="images/button/thoat.gif" border="0" align="middle" width="80" height="39" style="background:url(images/button/thoat.gif) no-repeat; cursor:pointer" />	</a>  	</td>
	<td width="30">
	<a href="mailto:root@website.com">
		<img src="images/button/btn_email.gif" border="0" align="middle" width="30" height="39" style="background:url(images/button/btn_email.gif) no-repeat; cursor:pointer"  />	</a>	</td>
	<td width="30" align="left" valign="middle">

	  <a href="#" onclick="this.style.behavior='url(#default#homepage)';this.setHomePage('http://fm.com');" style="CURSOR: hand">
	  <img src="images/button/btn_homepage.gif" border="0" align="middle" width="30" height="39" style="background:url(images/button/btn_homepage.gif) no-repeat; cursor:pointer"  /></a></td>
    <td width="30" valign="top">
	<a href="javascript:window.external.AddFavorite('http://testonline.com','Test Online System');">
	<img src="images/button/btn_favorites.gif" width="30" height="39" border="0" /></a></td>
    <td width="30" valign="top"><a href="include/logoff.jsp"><img src="images/button/btn_skin.gif" alt="Log Off" width="30" height="39" border="0" /></a></td>
  <td width="30" valign="top"><a href="user.jsp">
  <img src="images/button/btn_details.gif" width="30" height="39" border="0" /></a></td>

    <td width="30" valign="top"><a href="#"><img src="images/button/btn_help.gif" width="30" height="39" border="0" /></a></td>
    <td width="201">&nbsp;</td>
    <td width="248" align="right" valign="middle">

      <form id="form2" name="TraTu" method="post" action="javascript:OpenWebPage('Search.jsp')">
        <label></label>
        <label>
        <a href="#" target="top" >
            <img src="images/calculator.gif"  align="middle" border="0"/>		</a>
        <input type="text" name="txtkeyword" size="15" value="Từ điển Anh - Viêt" />
        </label>
        <label></label>
        <input type="submit" name="Submit" value="Tra Từ" />
        </form></td>
  </tr>
</table>


<%
	}	else {
%>
<SCRIPT language="javascript">
	function OpenWebPage(link){
		window.document.location = "index.jsp?Noidung=" + link
	}
	function Login()	{
                        if (document.Login.user.value = "") {
                            alert("Username can't null");
                            document.Login.user.focus();
                            return false;
                        }
                        if (document.Login.pass.value = "") {
                            alert("Password can't null");
                            document.Login.pass.focus();
                            return false;
                        }                    
                        return true;
	}
</SCRIPT>
<link rel="stylesheet" href="css/style.css" />
<link rel="stylesheet" href="css/front.css"  />
<table width="965" border="0" cellpadding="0" cellspacing="0" class="loginBar">
  <!--DWLayoutTable-->
  <tr>
  <form  name="Login" method="post" action="login" onsubmit="return Login(this);" >
    <td width="334" height="39" valign="middle">

      <label>Name
        <input type="text" name="user" size="15" height="20"/>
      </label>
        <label>Pass
        <input type="password" name="pass" size="15" height="20"/>
        </label>    </td>
  <td width="48" valign="middle">

		<input type="image" src="images/button/dangnhap.gif" width="75" height="39" border="0" style="background:url(images/button/dangnhap.gif) no-repeat; cursor:pointer; border:0; width:80; height:39" onclick="Login()"/>	</td>
	</form>
  <td width="56" valign="middle">
  	<a href="register.jsp" target="_top">
	<img src="images/button/dangky.gif" width="75" height="39" border="0" align="middle" lowsrc="images/button/btn_login_on.gif" style="background:url(images/button/dangky.gif) no-repeat; cursor:pointer" />	</a></td>
  <td width="99" valign="middle">
  	<a href="#">
	<img src="images/button/quenpass.gif" width="99" height="39" border="0" align="middle" />	</a></td>
  <td width="161">&nbsp;</td>
  <td width="229" align="right" valign="middle">

    <form id="form2" name="TraTu" method="post" action="javascript:OpenWebPage('Search.jsp')">
      <label></label>
      <label>
        <a href="#" target="top" >
          <img src="images/calculator.gif"  align="middle"/>		</a>
        <input type="text" name="txtkeyword" size="15" value="Từ Điển Anh - Việt" />
        </label>
      <label></label>
      <input type="submit" name="Submit" value="Tra Từ" />
      </form></td>
      <td>&nbsp;&nbsp;</td>
  </tr>
</table>
<%
	}
        } catch (Exception ex) {
            out.println(ex.toString());
            out.println(ex.getMessage());
        }
%>